package com.rpframework.module.common.bottom.controller

import com.rpframework.core.json.JsonResp
import com.rpframework.module.common.bottom.entity.Jurisdiction
import com.rpframework.module.common.bottom.service.JurisdictionService
import com.rpframework.module.common.url.RequestDescription
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.stereotype.Controller
import org.springframework.web.bind.annotation.RequestMapping
import org.springframework.web.bind.annotation.ResponseBody

@ResponseBody
@RequestMapping
@RequestDescription("权限URL地址")
@Controller
open class JurisdictionController {
    @Autowired
    lateinit var jurisdictionService: JurisdictionService

    @RequestMapping
    @RequestDescription("权限URL列表")
    open fun selectUrl() = JsonResp<List<Jurisdiction>>().data(Jurisdiction.dBParseView(jurisdictionService.selectUrl()))!!

}